<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script type="text/javascript">
    // 作用与 arguments 类似
    function f(a) {
        console.log(a);
    }

    f(1, 2, 3); // 1

    function f1(...args) {
        console.log(args);
    }

    f1(1, 2, 3); //(3) [1, 2, 3]

    function f2(a,b, ...args) {
        console.log(a);
        console.log(b);
        console.log(args);
    }

    f2(1, 2, 3, 4, 5);
    /*1
      2
      [3,4,5]
    * */


</script>
</html>